/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-09-04
 * Time: 15:21
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root =  binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.preorderTraversal1(root);
        System.out.println();
        binaryTree.inorderTraversal1(root);
        //System.out.println();
       // System.out.println(binaryTree.preorderTraversal2(root));
        //System.out.println(binaryTree.size(root));
        System.out.println("节点个数为：" + binaryTree.size2(root));
        //System.out.println("叶子节点个数为：" + binaryTree.getLeafNodeCount(root));
        //System.out.println("叶子节点个数为：" + binaryTree.getLeafNodeCount2(root));
        //System.out.println("第3层节点个数为：" + binaryTree.getKLevelNodeCount(root, 3));
        //System.out.println("树高为：" + binaryTree.getHeight(root));
        /*BinaryTree.TreeNode ret = binaryTree.find(root,'B');
        System.out.println(ret.val);*/
        binaryTree.levelOrder(root);
        System.out.println();
        System.out.println(binaryTree.isCompleteTree(root));
    }
}
